package com.itheima.exception;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Demo03 {

    public static void main(String[] args) throws ParseException{
        //sing();
        dance();
    }

    public static  void sing() {
        String  s=null;
        System.out.println(s.equals("嘿嘿嘿"));//NullPointerException
    }
    public static void  dance() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        try {
            sdf.parse("2022-1-4");
        } catch (ParseException e) {
            e.printStackTrace();
        }

    }
}
